package com.origin.onlinesys.common.services;

import org.apache.shiro.authz.Permission;

import java.util.Collection;
import java.util.Map;

/**
 *
 * shiro查询数据库权限
 * Created by Administrator on 2015/3/2.
 */
public interface IShiroPermissionsService {
     /**
      *
     * 查询数据库权限
     * @return Map<url地址,权限名称>
     */
    public Map<String, String> selectAllAsMap();

    /**
     * 查询数据库所有权限
     * @return
     */
    public Collection<Permission> selectAllAsObjPermissions();

    /**
     * 根据userid查询权限返回对象集合
     * @param id
     * @return
     */
    public Collection<Permission> selectByUserIdAsObjPermissions(String id);


    /**
     * 根据userid查询权限返回字符串集合
     * @param id
     * @return
     */
    public Collection<String> selectByUserIdAsStrPermissions(String id);

}
